package com.emm.yixun.common.model.enums;

import java.io.Serializable;

import org.apache.commons.lang.StringUtils;

public enum BusinessAbnormaEnum implements Serializable {
	// 0认购折扣审批 1认购换房 2签约折扣审批 3签约换房 4签约退房 5签约更改合同 6签约更名
	BusinessAbnorma_0("0", "认购折扣审批"), BusinessAbnorma_1("1", "认购换房"), BusinessAbnorma_2("2", "签约折扣审批"), BusinessAbnorma_3(
			"3", "签约换房"), BusinessAbnorma_4("4", "签约退房"), BusinessAbnorma_5("5", "签约更改合同"), BusinessAbnorma_6("6",
			"签约更名"), BusinessAbnorma_7("7", "退认筹"), BusinessAbnorma_8("8", "退认购"), BusinessAbnorma_9("9", "延期签约"), BusinessAbnorma_10(
			"10", "价格方案失效"), BusinessAbnorma_11("11", "认购更名"), BusinessAbnorma_12("12", "延期收款");
	private String no;
	private String name;

	public String getNo() {
		return no;
	}

	public void setNo(String no) {
		this.no = no;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	private BusinessAbnormaEnum(String no, String name) {
		this.no = no;
		this.name = name;
	}

	public static BusinessAbnormaEnum getByNo(String no) {
		if (StringUtils.isBlank(no)) {
			return null;
		}
		for (BusinessAbnormaEnum menum : BusinessAbnormaEnum.values()) {
			if (menum.getNo().equals(no)) {
				return menum;
			}
		}
		return null;
	}

}
